package com.breezelin.freshmarket.network.asynctasks;

/**
 * Created by Breeze Lin
 * 2:54 2016/5/19
 * 1linyufeng1@gmail.com
 */

import com.breezelin.freshmarket.entities.data.ProductDetail;
import com.breezelin.freshmarket.network.FMAsyncTask;
import com.breezelin.freshmarket.network.apis.ContentApi;

/**
 * 产品详情获取任务
 */
public abstract class ProductDetailTask extends FMAsyncTask<Void, Void, ProductDetail> {

	/**
	 * 产品id
	 */
	private String id;

	/**
	 * @param id 产品id
	 */
	protected ProductDetailTask(String id) {
		super(ContentApi.GET_PRODUCT_DETAIL);
		this.id = id;
	}

	@Override
	protected ProductDetail doInBackground(Void... params) {
		return ContentApi.getProductDetail(id);
	}
}
